package com.linhz.demo04.Reader;



import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/*
int read()
int read(char[] buf)
void close
 */
public class Demo02Reader {
    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("Files/test.txt");
//        int len = 0;
//        while((len = fr.read())!=-1){
//            System.out.print((char)len);
//        }

        char[] cs = new char[1024];
        int len = 0;
        while ((len = fr.read(cs))!=-1){
            System.out.println(new java.lang.String(cs,0,len));
        }
        fr.close();
    }
}
